import { create } from 'zustand'
import { devtools } from 'zustand/middleware'

export const useCounterStore = create(devtools(set => ({
  value: 0,
  increment: () => set(state => ({ value: state.value + 1 })),
  decrement: () => set(state => ({ value: state.value - 1 })),
  incrementByAmount: amount => set(state => ({ value: state.value + amount })),
})))
